#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys
from guiHandler import JsHandler
try:
  exec(open("import_qt.py").read())
except FileNotFoundError:
  print("You need to copy import_pyqt5.py or import_pyside.py to import_qt.py")
  exit()


def main():

  app = QApplication(sys.argv)

  w = QWebView()
  w.load(QUrl("html/gui.html"))
  w.show()

  frame = w.page().mainFrame()
  js = JsHandler(frame)
  frame.loadFinished.connect(js.loaded)
  w.resize(600,300)


  inspector = QWebInspector();
  inspector.setPage(w.page());
  #inspector.show();

  sys.exit(app.exec_())


if __name__ == '__main__':
    main()
